﻿using System.Collections.Generic;
using CkSoftware.GroupMe.Sdk.Core.Serialization;
using Newtonsoft.Json;

namespace CkSoftware.GroupMe.Sdk.Core.Dao
{
	/// <summary>
	/// GroupMe emoji attachment.
	/// </summary>
	public class GroupMeEmojiAttachment : GroupMeAttachmentBase
	{
		/// <summary>
		/// Defines the type of the attachment implementation.
		/// </summary>
		public override AttachmentType Type
		{
			get { return AttachmentType.Emoji; }
		}

		/// <summary>
		/// Defines if the attachment is inline (inside the text) or seperated from the text.
		/// </summary>
		public override bool IsInlineAttachment
		{
			get { return true; }
		}

		/// <summary>
		/// Defines the character used for emoji replacement.
		/// </summary>
		[JsonProperty("placeholder")]
		public char EmojiPlaceholder { get; set; }

		/// <summary>
		/// The emoji character map.
		/// </summary>
		[JsonProperty("charmap")]
		[JsonConverter(typeof (GroupMeEmojiMapConverter))]
		public IEnumerable<GroupMeEmojiDefinition> EmojiMap { get; set; }
	}
}